package se.hrbustrc.hlgshopping.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName tb_prosku
 */
@TableName(value ="tb_prosku")
@Data
public class Prosku implements Serializable {
    /**
     * 商品型号ID
     */
    @TableId(value ="FSKUId",type = IdType.AUTO)
    private Long skuid;

    /**
     * 商品ID
     */
    @TableField("FPID")
    private Long pid;

    /**
     * 型号名称
     */
    @TableField("FSKUName")
    private String skuname;

    /**
     * 商品售价
     */
    @TableField("FPriceSell")
    private Long pricesell;

    /**
     * 商品原价
     */
    @TableField("FPriceOrigion")
    private Long priceorigion;

    /**
     * 库存数量
     */
    @TableField("FStockNum")
    private Integer stocknum;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Prosku other = (Prosku) that;
        return (this.getSkuid() == null ? other.getSkuid() == null : this.getSkuid().equals(other.getSkuid()))
            && (this.getPid() == null ? other.getPid() == null : this.getPid().equals(other.getPid()))
            && (this.getSkuname() == null ? other.getSkuname() == null : this.getSkuname().equals(other.getSkuname()))
            && (this.getPricesell() == null ? other.getPricesell() == null : this.getPricesell().equals(other.getPricesell()))
            && (this.getPriceorigion() == null ? other.getPriceorigion() == null : this.getPriceorigion().equals(other.getPriceorigion()))
            && (this.getStocknum() == null ? other.getStocknum() == null : this.getStocknum().equals(other.getStocknum()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getSkuid() == null) ? 0 : getSkuid().hashCode());
        result = prime * result + ((getPid() == null) ? 0 : getPid().hashCode());
        result = prime * result + ((getSkuname() == null) ? 0 : getSkuname().hashCode());
        result = prime * result + ((getPricesell() == null) ? 0 : getPricesell().hashCode());
        result = prime * result + ((getPriceorigion() == null) ? 0 : getPriceorigion().hashCode());
        result = prime * result + ((getStocknum() == null) ? 0 : getStocknum().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", skuid=").append(skuid);
        sb.append(", pid=").append(pid);
        sb.append(", skuname=").append(skuname);
        sb.append(", pricesell=").append(pricesell);
        sb.append(", priceorigion=").append(priceorigion);
        sb.append(", stocknum=").append(stocknum);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}